import request from '@/utils/request'
import {
  getToken
} from "@/utils/auth";

// 查询详情
export function getRegistration(id) {
  return request({
    url: '/car/licensePlate/' + id,
    method: 'get'
  })
}


// 编辑
export function updateRegistration(data) {
  return request({
    url: '/car/licensePlate',
    method: 'put',
    data: data
  })
}

// 新增

export function addRegistration(data) {
  return request({
    url: '/car/licensePlate',
    method: 'post',
    data: data
  })
}

// 证件识别/car/licensePlate//uploadDriverLicense/{id}
export function uploadDriverLicense(id) {
  return request({
    url: '/car/licensePlate//uploadDriverLicense/' + id,
    method: 'get',

  })
}

//根据城市判断是否剩余指标
export function getInfoByCityIdAndType(data) {
  return request({
    url: '/car/carIndex/getInfoByCityIdAndType',
    method: 'post',
    data
  })
}

//登记证识别
export function getVehicleRegistrationCertificate(id) {
  return request({
    url: `/car/licensePlate/vehicleRegistrationCertificate/${id}`,
    method: 'get',
  })
}
